import { combineReducers } from 'redux'
import { userSlice } from './slices/userSlice'
import { searchSlice } from './slices/searchSlice'
import { userApiSlice } from '../../api/userApiSlice'
import { alertSlice } from './slices/alertSlice'
import { productsApiSlice } from '../../api/productsApiSlice'
import { paginationSlice } from './slices/paginationSlice'
import { cartSlice } from './slices/cartSlice'

export const rootReducer = combineReducers({
	[userApiSlice.reducerPath]: userApiSlice.reducer,
	[userSlice.name]: userSlice.reducer,
	[productsApiSlice.reducerPath]: productsApiSlice.reducer,
	[paginationSlice.name]: paginationSlice.reducer,
	[searchSlice.name]: searchSlice.reducer,
	[alertSlice.name]: alertSlice.reducer,
	[cartSlice.name]: cartSlice.reducer,
})
